Skip to content

Upgrade simplejson to 3.18.4 #136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Upgrade simplejson to 3.18.4 #136

merged 1 commit into from
Mar 27, 2024

Conversation

kpark-hrp
Copy link
Contributor

@kpark-hrp kpark-hrp commented Mar 15, 2024

Issue:

fixes #135
fixes #93
fixes #62

Description of changes:

  • Upgrades to simplejson==3.18.4
  • Update unit test accordingly

Testing

make pr
make test
make test-smoke
make test-integ

Target (OCI, Managed Runtime, both):

Both


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kpark-hrp kpark-hrp marked this pull request as ready for review March 15, 2024 23:29
@kpark-hrp kpark-hrp marked this pull request as draft March 16, 2024 20:53
@kpark-hrp kpark-hrp changed the title Upgrade simplejson to 3.19.2 Upgrade simplejson to 3.18.4 Mar 17, 2024
class TestException(Exception):
pass

expected_app_root = "/tmp/test/app_root"
expected_handler = "app.my_test_handler"
expected_lambda_runtime_api_addr = "test_addr"

mock_build_fault_result.return_value = {}
Copy link
Contributor Author

@kpark-hrp kpark-hrp Mar 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to mock build_fault_result() return value because newer simplejson will throw an error when it tries to JSON encode a MagicMock type.

E           TypeError: _asdict() must return a dict, not MagicMock

error_result = build_fault_result(sys.exc_info(), None)
log_error(error_result, log_sink)
lambda_runtime_client.post_init_error(to_json(error_result))

@kpark-hrp kpark-hrp marked this pull request as ready for review March 17, 2024 22:50
@kpark-hrp
Copy link
Contributor Author

kpark-hrp commented Mar 17, 2024

@briensea @alex-pewpew @pushkarchawda @andclt
Can I get a review?

@dgilman-hrp
Copy link

LGTM

Copy link

@carndt-hrp carndt-hrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@briensea briensea merged commit f118042 into aws:main Mar 27, 2024
1 check passed
@briensea
Copy link
Contributor

Thanks for contributing

@kpark-hrp kpark-hrp deleted the kpark-hrp/upgrade-simplejson branch March 27, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Outdated simplejson dependency simplejson==3.18.1 not supported Subtle 3.9 incompatibility via simplejson
5 participants